package com.bkgy.controller.planking.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bkgy.controller.planking.dao.TBProfit1870Dao;
import com.bkgy.controller.planking.entity.TbProfit1870;
import com.bkgy.controller.planking.service.ITbProfit1870Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TbProfit1870ServiceImpl extends ServiceImpl<TBProfit1870Dao, TbProfit1870> implements ITbProfit1870Service {
    @Autowired
    TBProfit1870Dao dao;

    @Override
    public TbProfit1870 selectTopRecord(String entid) {
        return dao.selectTopRecord(entid);
    }

    @Override
    public void removeAfterDate(String begingDate) {
        LambdaQueryWrapper<TbProfit1870> wrapper = new LambdaQueryWrapper<>();
        wrapper.ge(TbProfit1870::getCredate, begingDate);
        dao.delete(wrapper);
    }
}
